package com.woniuxy.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.woniuxy.system.entity.Manager;
import com.woniuxy.system.mapper.ManagerMapper;
import com.woniuxy.system.service.IManagerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * <p>
 * 内部员工信息 服务实现类
 * </p>
 *
 * @author 作者
 * @since 2023-10-13
 */
@Service
public class ManagerServiceImpl extends ServiceImpl<ManagerMapper, Manager> implements IManagerService {

    @Override
    public Manager login(String userName, String password) {
        LambdaQueryWrapper<Manager> wrapper = Wrappers.lambdaQuery(Manager.class);
        wrapper.eq(Manager::getUserName,userName);
        wrapper.eq(Manager::getUserPassword,password);
        return baseMapper.selectOne(wrapper);
    }
}
